/// <reference path="./BaseOral.ts" />
namespace wmedu {
    /** 四则运算：先加再乘（加法带括号） */
    export class FourOper_AM_B extends BaseOral implements IOralCreater {
        create(opt: IOralOpt) {
            let paramArea = opt.paramArea;
            let ops: Enum_OralOp[] = [Enum_OralOp.Add, Enum_OralOp.Mul];
            let brackets: number[] = [0, 1]
            let first = new FourOper_Add();
            let fres = first.create(opt)
            // 得到结果值
            let p1 = fres.value
            let p2 = this.mGetRandomInt(opt.mdParamArea);
            let value = p1 * p2;


            let nums: number[] = fres.nums.concat(p2);
            let str = BuildUtil.getOralStr(opt.blankSide, opt.blankStr, nums, ops, value,brackets);
            let res: IOralSide = { nums: nums, ops: ops, value: value, str }
            return res;
        }
    }
}